﻿using System;
using System.Collections.Generic;
using System.Text;

namespace C11_Ex01_3
{
    public class Program
    {
        public static void Main()
        {
            string input;
            int height = 1;
            bool parsingSuccess = false;

            while (!parsingSuccess)
            {
                System.Console.WriteLine("Please enter the height of the diamond.");
                input = System.Console.ReadLine();
                parsingSuccess = int.TryParse(input, out height);
                if (!parsingSuccess)
                {
                    System.Console.WriteLine("{0} is not a valid input.", input);
                }
            }

            if (height > 0)
            {
                C11_Ex01_2.Program.PrintDiamod(height);
            }

            System.Console.Write("Press any key to continue . . . ");
            System.Console.ReadLine();
        }
    }
}
